const api = require('./api') //postRequest 无需验证token  PostRequest 需要验证token
// 推荐位
export const position = {
	content: {
		detail(data, fun) {
			return api.postRequest("/api/position.content/detail", data, fun)
		},
	},
}
// 文章
export const article = {
	lists(data, fun) {
		return api.postRequest("/api/article/lists", data, fun)
	},
	detail(data, fun) {
		return api.postRequest("/api/article/detail", data, fun)
	},
}
// 站点
export const station = {
	all(data, fun) {
		return api.postRequest('/api/station/all', data, fun)
	},
	detail(data, fun) {
		return api.postRequest('/api/station/detail', data, fun)
	},
	current(data, fun) {
		return api.postRequest('/api/station/current', data, fun)
	},
	member: {
		lists(data, fun) {
			return api.postRequest("/api/station.member/lists", data, fun)
		},
		detail(data, fun) {
			return api.postRequest("/api/station.member/detail", data, fun)
		},
	},
	feedback:{
		submit(data, fun) {
			return api.PostRequest("/api/station.feedback/submit", data, fun)
		},
		lists(data, fun) {
			return api.PostRequest("/api/station.feedback/lists", data, fun)
		},
		detail(data, fun) {
			return api.PostRequest("/api/station.feedback/detail", data, fun)
		},
		myList(data, fun) {
			return api.PostRequest("/api/station.feedback/myList", data, fun)
		},
		myDetail(data, fun) {
			return api.PostRequest("/api/station.feedback/myDetail", data, fun)
		},
	}
}
// 代表端
export const member = {
	station:{
		memberLogin(data, fun) {
			return api.postRequest('/member/station.member/login', data, fun)
		},
		memberDetail(data, fun) {
			return api.PostRequest2('/member/station.member/detail', data, fun)
		},
		memberEditInfo(data, fun) {
			return api.PostRequest2('/member/station.member/editInfo', data, fun)
		},
		changePassword(data, fun) {
			return api.PostRequest2('/member/station.member/changePassword', data, fun)
		}
	},
	wxapp:{
		bindUser(data, fun) {
			return api.PostRequest2('/member/wxapp/bindUser', data, fun)
		},
		unbindUser(data, fun) {
			return api.PostRequest2('/member/wxapp/unbindUser', data, fun)
		},
		login(data, fun) {
			return api.postRequest('/member/wxapp/login', data, fun)
		}
	},
	feedbackList(data, fun) {
		return api.PostRequest2('/member/station.feedback/myList', data, fun)
	},
	feedbackDetail(data, fun) {
		return api.PostRequest2('/member/station.feedback/detail', data, fun)
	},
	feedbackReply(data, fun) {
		return api.PostRequest2('/member/station.feedback/reply', data, fun)
	}
}
// 用户信息
export const user = {
	detail(data, fun) {
		return api.PostRequest('/api/user/detail', data, fun)
	},
	detailS(data, fun) {
		return api.postRequest('/api/user/detail', data, fun)
	},
	editInfo(data, fun) {
		return api.PostRequest('/api/user/editInfo', data, fun)
	},
	comment:{
		lists(data, fun) {
			return api.PostRequest('/api/user.comment/lists', data, fun)
		},
		submit(data, fun) {
			return api.PostRequest('/api/user.comment/submit', data, fun)
		},
	},
	like:{
		submit(data, fun) {
			return api.PostRequest('/api/user.like/submit', data, fun)
		},
	}
}
// 微信登陆
export const wechat = {
	login(data, fun) {
		return api.postRequest('/api/wxapp/login', data, fun)
	},
	staffLogin(data, fun) {
		return api.postRequest('/api/wxapp/staffLogin', data, fun)
	}
}
